package com.ak.common.entity;

public class Enums {

    public enum RandomType {
        INT, STRING, ALL
    }

    public enum ApplicationCodes implements EnumFacade {
        PLATFORM_TENANT_APPCODE("PlatformManage", "平台管理子系统"),
        PLATFORM_MONITOR_APPCODE("PlatformMonitor", "统一监控子系统"),
        //PLATFORM_QUARTZ_APPCODE("PlatformQuartz", "任务调度子系统"),

        TENANT_BASEDATE_APPCODE("TenantBasedate", "基础数据子系统"),
        TENANT_LOG_APPCODE("TenantLog", "日志查询子系统"),
        TENANT_API_APPCODE("TenantAPI","Open API");
        private final String code;
        private final String info;
        ApplicationCodes(String code, String info) {
            this.code = code;
            this.info = info;
        }
        @Override
        public String getCode() {
            return code;
        }
        @Override
        public String getInfo() {
            return info;
        }
    }

    public enum ApplicationType implements EnumFacade {
        PLATFORM("0", "平台内置"), TENANT("1", "租户开放");
        private final String code;
        private final String info;
        ApplicationType(String code, String info) {
            this.code = code;
            this.info = info;
        }
        @Override
        public String getCode() {
            return code;
        }
        @Override
        public String getInfo() {
            return info;
        }
    }

    public enum DatabaseType implements EnumFacade {
        MYSQL("com.mysql.cj.jdbc.Driver", "MySQL"), ORACLE("oracle.jdbc.driver.OracleDriver", "Oracle");
        private final String code;
        private final String info;
        DatabaseType(String code, String info) {
            this.code = code;
            this.info = info;
        }
        @Override
        public String getCode() {
            return code;
        }
        @Override
        public String getInfo() {
            return info;
        }
    }

    public enum DatabaseFlag implements EnumFacade {
        MAIN("M", "主库"), WRITE("W", "写入库"), ORACLE("R", "查询库");
        private final String code;
        private final String info;
        DatabaseFlag(String code, String info) {
            this.code = code;
            this.info = info;
        }
        @Override
        public String getCode() {
            return code;
        }
        @Override
        public String getInfo() {
            return info;
        }
    }

    public enum Status implements EnumFacade {
        /**
         * 0：停用；1正常：
         */
        DISABLE("0", "停用"), OK("1", "正常");
        private final String code;
        private final String info;
        Status(String code, String info) {
            this.code = code;
            this.info = info;
        }
        @Override
        public String getCode() {
            return code;
        }
        @Override
        public String getInfo() {
            return info;
        }
    }

    public enum DelFlag implements EnumFacade {
        /**
         * 0：存在；1：删除
         */
        EXIST("0", "存在"), DEL("1", "删除");
        private final String code;
        private final String info;
        DelFlag(String code, String info) {
            this.code = code;
            this.info = info;
        }
        @Override
        public String getCode() {
            return code;
        }
        @Override
        public String getInfo() {
            return info;
        }
    }

    public enum Sex implements EnumFacade {
        /**
         * 0：女；1：男；2：保密
         */
        FEMALE("0", "女"), MALE("1", "男"), UNKNOW("2", "保密");
        private final String code;
        private final String info;
        Sex(String code, String info) {
            this.code = code;
            this.info = info;
        }
        @Override
        public String getCode() {
            return code;
        }
        @Override
        public String getInfo() {
            return info;
        }
    }
}
